feat: export parse as public library surface - #4
Merged
Conversation
emitModule/mergeRules only consume an already-parsed AST; nothing in the package's public exports could produce one. A consumer running cddl.js's own generation pipeline directly, rather than shelling out to src/cli.ts, had no way to parse a .cddl file at all. Wraps the vendored parser's parse() (typed unknown at this boundary, matching emitModule/mergeRules's existing unknown-typed input, rather than leaking the vendored AST's own type shapes into the public contract). _build now depends on _vendor:build in turbo.json, since src/parse.ts's bundle needs vendor/cddl/dist/index.js to exist -- previously nothing in the build entry touched vendor/, so the dependency had never been needed. Also drops _build's stale reference to the removed src/index.ts barrel file.
Mearman
marked this pull request as ready for review
September 10, 2026 08:58
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
emitModule/mergeRules only consume an already-parsed AST; nothing in the package's public exports could produce one. A consumer running cddl.js's own generation pipeline directly (parse a .cddl file, then emitModule() the result) rather than shelling out to src/cli.ts had no way to parse a .cddl file at all -- needed by wire-mesh's ts/packages/core, which generates its own committed schema file via a local script rather than invoking the CLI as a subprocess.
Wraps the vendored parser's parse() as a real function (typed unknown at this boundary, matching emitModule/mergeRules's existing unknown-typed input) rather than a bare re-export, since the project's barrel-policy lint rule flags re-export-only files.